package org.djw.system.service.impl;

import org.djw.basic.service.impl.BaseServiceImpl;
import org.djw.basic.util.PageList;
import org.djw.system.domain.Detail;
import org.djw.system.mapper.DetailMapper;
import org.djw.system.query.DetailQuery;
import org.djw.system.query.TypeQuery;
import org.djw.system.service.IDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class DetailServiceImpl extends BaseServiceImpl<Detail> implements IDetailService {
    @Autowired
    private DetailMapper detailMapper;

    @Override
    public PageList<Detail> queryPageType(DetailQuery query) {
        Long count = detailMapper.queryCount(query);
        List<Detail> rows = detailMapper.queryPageType(query);

        return new PageList<Detail>(count,rows);
    }
}
